<template>
    <router-view/>
</template>

<script setup lang="ts">

// 设置主题颜色
import {setThemeColor} from "@/utils/theme";
import {useLayoutSetStore} from "@/store/layout-set";
import {watch} from "vue";
const setStore = useLayoutSetStore()
// 设置主题颜色
setThemeColor({
    color: setStore.theme,
})
// 监听主题颜色的变换，实现实时改变主题
watch(()=>setStore.theme, (nv, ov) =>{
    if (nv !=ov){
        setThemeColor({color: nv})
    }
})
</script>

<style scoped>
</style>
